package top.yxf.mcp.server.juejing.domain.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
public class ArticleFunctionResponse {
    /**
     * 错误码
     * 0：成功
     * 非0：失败
     */
    @JsonProperty(required = true, value = "code")
    @JsonPropertyDescription("错误码")
    private Integer code;

    /**
     * 错误信息
     * success：成功
     * 失败时为错误信息
     */
    @JsonProperty(required = true, value = "msg;")
    @JsonPropertyDescription("失败时为错误信息")
    private String msg;


    private SourceData data;

    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public static class SourceData {

        @JsonProperty(required = true, value = "articleId")
        @JsonPropertyDescription("文章ID")
        private String articleId;


        @JsonProperty(required = true, value = "title")
        @JsonPropertyDescription("文章标题")
        private String title;

        @JsonProperty(required = true, value = "linkUrl")
        @JsonPropertyDescription("文章发布地址")
        private String linkUrl;

        @JsonProperty(required = true, value = "auditStatus")
        @JsonPropertyDescription("审核状态")
        private Integer  auditStatus;

        @JsonProperty(required = true, value = "rtime")
        @JsonPropertyDescription("发布时间")
        private String rtime;
    }

}
